package com.ctsi.offlinesupport.app.rest.request;

import com.ctsi.supportflow.app.entity.SupportInfo;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: zhangjw
 * @Date: 2018/10/9 21:28
 * @Description:
 */
public class AddFlowInfoRequest implements Serializable {
    private static final long serialVersionUID = -4343776902056102071L;

    /**
     * 客户群ID
     */
    private String customGroupId;
    /**
     * 客户名称
     */
    private String customName;
    /**
     * 是否是自动派单
     */
    private Integer standard = 1;

    /**
     * 支撑经理ID，当客户经理发起支撑时，指定手动派单给对应的支撑经理
     * 废弃，不允许指定支撑经理派单
     */
    @Deprecated
    private String zcjlId;

    /**
     * 支撑类型
     */
    private String supportType;

    /**
     * 服务类型 (售中 售前 售后)
     */
    private String seviceType;

    /**
     * 要求完成时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd" , iso = DateTimeFormat.ISO.DATE)
    public Date requiredFinshtime;

    /**
     * 项目需求
     */
    private String projectRequirement;

    /**
     * 是否上报，默认false 0
     */
    private Integer isReport = 0;

    public SupportInfo toSupportInfo(){
        SupportInfo info = new SupportInfo();
        info.setCustomGroupId(this.customGroupId);
        info.setCustomName(this.customName);
        info.setIsAuto(this.standard);
        info.setSupportType(this.supportType);
        info.setSeviceType(this.seviceType);
        info.setRequiredFinshtime(this.requiredFinshtime.getTime());
        info.setProjectRequirement(this.projectRequirement);
        info.setIsReported(this.isReport);
        return info;
    }

    public String getZcjlId() {
        return zcjlId;
    }

    public void setZcjlId(String zcjlId) {
        this.zcjlId = zcjlId;
    }

    public AddFlowInfoRequest() {
    }

    public String getCustomGroupId() {
        return this.customGroupId;
    }

    public void setCustomGroupId(String customGroupId) {
        this.customGroupId = customGroupId;
    }

    public String getCustomName() {
        return this.customName;
    }

    public void setCustomName(String customName) {
        this.customName = customName;
    }

    public Integer getStandard() {
        return this.standard;
    }

    public void setStandard(Integer standard) {
        this.standard = standard;
    }

    public String getSupportType() {
        return this.supportType;
    }

    public void setSupportType(String supportType) {
        this.supportType = supportType;
    }

    public String getSeviceType() {
        return this.seviceType;
    }

    public void setSeviceType(String seviceType) {
        this.seviceType = seviceType;
    }

    public Date getRequiredFinshtime() {
        return this.requiredFinshtime;
    }

    public void setRequiredFinshtime(Date requiredFinshtime) {
        this.requiredFinshtime = requiredFinshtime;
    }

    public String getProjectRequirement() {
        return this.projectRequirement;
    }

    public void setProjectRequirement(String projectRequirement) {
        this.projectRequirement = projectRequirement;
    }

    public Integer getIsReport() {
        return isReport;
    }

    public void setIsReport(Integer isReport) {
        this.isReport = isReport;
    }
}
